import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";

// https://vitejs.dev/config/
export default defineConfig({
  build: {
    outDir: "dist",
    assetsDir: "assets",
    rollupOptions: {
      output: {
        chunkFileNames: "assets/js/[name]-[hash].js",
        entryFileNames: "assets/js/[name]-[hash].js",
        // assetFileNames: "assets/[ext]/[name]-[hash].[ext]",
      },
    },
    terserOptions: {
      compress: {
        drop_console: true,
        drop_debugger: true,
      },
    },
  },
  css{}
  plugins: [vue()],
  server: {
    port: 8888,
    host: "192.168.137.1",
    open: false,
    cors: true,
  },
});


// css: {
//   postcss: {
//     plugins: [
//       require("autoprefixer")({
//         overrideBrowserslist: ["last 2 version", ">1%", "ios 7"],
//       }),
//       require("postcss-px2rem")({
//         remUnit: 75,
//         threeVersion: true,
//       }),
//     ],
//   },
// },